package jn.cdz.common.util.caculate.util;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * @Author 池辽
 * @Date 2019/12/27 14:49
 **/
public class CaculateUtil {
    public BigDecimal calculate(BigDecimal one, BigDecimal another) {
        return one.add(another);
    }
    public Integer halfUp(BigDecimal one) {
        if (one == null) {
            return 0;
        }
        return one.setScale(0, RoundingMode.HALF_UP).intValue();
    }
}
